import request from '@/router/axios';
const urlPrefix = '/admin';

export function list(data) {
    return request.post(urlPrefix + '/video-channel/list', data);
}
export function update(data) {
    return request.post(urlPrefix + '/video-channel/update', data);
}

export function setRecord({ channelNo, flag }) {
    return request.post(urlPrefix + '/video-channel/set_record', { channelNo, flag });
}

export function recordList(params) {
    return request.post(urlPrefix + '/video-channel/record/list', params);
}

// 删除直播录像
export function deleteRecord(id) {
    return request.post(urlPrefix + '/video-channel/record/delete', { id });
}

// 设置直播录像置顶
export function setRecordTop(id) {
    return request.post(urlPrefix + '/video-channel/record/set_top', { id });
}

// 取消设置直播录像置顶
export function cancelRecordTop(id) {
    return request.post(urlPrefix + '/video-channel/record/cancel_top', { id });
}

// 设置直播间浏览次数
export function setJoinNum(id,joinNum){
    return request.post(urlPrefix + '/video-channel/set_join_num', { id,joinNum });
}

// 设置直播录像播放次数
export function setViewNum(id,viewNum){
    return request.post(urlPrefix + '/video-channel/record/set_view_num', { id,viewNum });
}

// 分页查询直播间商品
export function liveGoods(data){
    return request.post(urlPrefix + '/video-channel/goods_list',data);
}
